package com.molichuxing.services.business.service;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.services.business.dto.request.modify.ReportModifyBizDto;
import com.molichuxing.services.business.dto.response.CarCheckDto;
import com.molichuxing.services.business.dto.response.PdiCheckBizDto;
import com.molichuxing.services.infrastructure.dto.request.modify.CheckModifyDto;
import com.molichuxing.services.infrastructure.dto.request.modify.DisPdiCheckModifyDto;
import com.molichuxing.services.infrastructure.dto.request.modify.PdiCheckModifyDto;
import com.molichuxing.services.property.CarCheckStatusEnum;
import com.molichuxing.services.property.CarsTypeEnum;

/**
 * <p>
 * 车辆检验信息服务类
 * </p>
 *
 * @author
 * @since 2019-07-29
 */
public interface CarCheckBizService {

	/***
	 * 根据查询条件获取车辆检验列表信息
	 *
	 * @param licencePlate
	 * @param vin
	 * @param carsTypeEnum
	 * @param carCheckStatusEnum
	 * @param startCheckTime
	 * @param endCheckTime
	 * @param pageSize
	 * @param pageNum
	 * @return
	 */
	Paged<CarCheckDto> getCarCheck(String licencePlate, String vin, CarsTypeEnum carsTypeEnum,
			CarCheckStatusEnum carCheckStatusEnum, LocalDateTime startCheckTime, LocalDateTime endCheckTime,
			Integer pageSize, Integer pageNum);

	/**
	 * 根据车辆id获取检验信息
	 *
	 * @param carId
	 * @return
	 */
	List<CarCheckDto> getCheckByCarId(Integer carId);

	/**
	 * 根据订单号获取检验信息
	 *
	 * @param orderCode
	 * @return
	 */
	List<CarCheckDto> getCheckByOrderCode(Long orderCode);

	/***
	 * 新车检验 验车
	 *
	 * @param checkModifyDto
	 */
	Boolean checkCar(CheckModifyDto checkModifyDto) throws Exception;

	/***
	 * PDI 检验 检验列表页
	 *
	 * @param licencePlate
	 * @param vin
	 * @param orderCode
	 * @param returnStoreId
	 * @param carCheckStatusEnum
	 * @param pageSize
	 * @param pageNum
	 * @return
	 */
	Paged<CarCheckDto> getPdiCarCheck(String licencePlate, String vin, Long orderCode, Integer returnStoreId,
			CarCheckStatusEnum carCheckStatusEnum, Integer pageSize, Integer pageNum, Integer dealerId);

	/***
	 * PDI 检验 验车
	 *
	 * @param pdiCheckModifyDto
	 */
	Boolean pdiCheckCar(PdiCheckModifyDto pdiCheckModifyDto) throws Exception;

	/***
	 * 争议处理
	 *
	 * @param disPdiCheckModifyDto
	 * @return
	 */
	Boolean discussPdiCheck(DisPdiCheckModifyDto disPdiCheckModifyDto);

	/**
	 * 根据订单号查询验车报告
	 *
	 * @param orderCode
	 * @return
	 */
	PdiCheckBizDto getCheckReport(Long orderCode);

	/**
	 * 验车报告确认
	 * @return
	 * @throws Exception
	 */
	Boolean modifyReportConfirm(ReportModifyBizDto reportModifyBizDto) throws Exception;

	/**
	 * 争议处理
	 * @param checkId
	 * @param discussLossFee
	 * @param remark
	 * @param operatorAccount
	 * @return
	 */
	boolean modifyCheckDispute(Integer checkId, BigDecimal discussLossFee, String remark, String operatorAccount) throws Exception;

}
